home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / fido / js_toss102b.lha / js_tosser / Install < prev    next >
Text File  |  1995-05-08  |  10KB  |  411 lines

  1. ; JS_TOSS Installer Script
  2. ; by Jⁿrgen Schmitz
  3.  
  4. ;--------------------------------------------------------------------
  5. ;set text vars
  6. ;
  7.  
  8. (set #inst
  9.   (cat "Installation script of JS_TOSS.\n\n"
  10.        "JS_TOSS is published as SHAREWARE.\n"
  11.        "for more details read the manual.\n\n"
  12.        "The program is copyright (c) by Jⁿrgen Schmitz\n"
  13.        "all rights reserved\n\n"
  14. ))
  15.  
  16. (set #update
  17.   (cat "An existing config file of JS_TOSS was found."
  18. ))
  19.  
  20. (set #update_choices_update
  21.   (cat "update binaries only"
  22. ))
  23.  
  24. (set #update_choices_new
  25.   (cat "install new"
  26. ))
  27.  
  28. (set #start
  29.   (cat "Welcome to the installation script of JS_TOSS.\n\n"
  30.        "Please read the manual (JS_TOSS.doc) durring and after "
  31.        "installation with this script to known what has happened "
  32.        "and how to continue.\n\n"
  33.        "This script only copies all required data and generates "
  34.        "a basic config file. But to use JS_TOSS completely you "
  35.        "may need to edit and change the config files by hand to your "
  36.        "needs. The doc files will help you!"
  37. ))
  38.  
  39. (set #binaryDrawer
  40.   (cat "Select a drawer for the binaries\n"
  41.        "(no new directory will be created)"
  42. ))
  43.  
  44. (set #WBbinDrawer
  45.   (cat "Select a drawer for the binaries that could be started from "
  46.        "Workbench (e.g. the config program).\n"
  47.        "(no new directory will be created)"
  48. ))
  49.  
  50. (set #areasDrawer
  51.   (cat "Select a drawer for the area config files directory\n"
  52.        "(a directory JS_TOSS will be created)"
  53. ))
  54.  
  55. (set #areafixlanguages
  56.   (cat "JS_Areafix supports different languages for its reply mails. "
  57.        "Now you may choose which one. But you can change this later "
  58.        "again to your needs. If the language you want isn't shown "
  59.        "here you can simple create it by your own. Look in "
  60.        "JS_AREAFIX.doc for details."
  61. ))
  62.  
  63. (set #nodelistDrawer
  64.   (cat "Select the drawer of the traplist compiled nodelist"
  65. ))
  66.  
  67. (set #tempDrawer
  68.   (cat "Select a drawer for temporary files. This shouldn't be on "
  69.        "a ram disk!\n(e.g. make a directory t in mail:)"
  70. ))
  71.  
  72. (set #inboundDrawer
  73.   (cat "Select your INBOUND directory"
  74. ))
  75.  
  76. (set #outboundDrawer
  77.   (cat "Select your OUTBOUND directory"
  78. ))
  79.  
  80. (set #sysinDrawer
  81.   (cat "Select INBOUND directory of SYSOP tosser\n"
  82.        "(where your tosser looks for new mail packets)"
  83. ))
  84.  
  85. (set #sysoutDrawer
  86.   (cat "Select OUTBOUND directory of SYSOP tosser\n"
  87.        "(where your tosser places exported mail packets)"
  88. ))
  89.  
  90. (set #bbsinDrawer
  91.   (cat "Select INBOUND directory of your BBS\n"
  92.        "(where it looks for new mail packets)"
  93. ))
  94.  
  95. (set #bbsoutDrawer
  96.   (cat "Select OUTBOUND directory of your BBS\n"
  97.        "(where it places exported mail packets)"
  98. ))
  99.  
  100. (set #node_number
  101.   (cat "Enter your FidoNet (or compatibel) address\n"
  102.        "(zone:net/node.point)"
  103. ))
  104.  
  105. (set #node_name
  106.   (cat "Enter your name (sysop name)\n"
  107.        "(allowes AmigaDOS patterns)"
  108. ))
  109.  
  110. (set #node_uplink1
  111.   (cat "Enter an uplink address\n"
  112.        "(zone:net/node.point)"
  113. ))     
  114. (set #node_uplink2
  115.   (cat "Enter a 2nd up- or downlink address\n"
  116.        "(zone:net/node.point)"
  117. ))     
  118.  
  119. (set #node_uplink3
  120.   (cat "Enter a 3rd up- or downlink address\n"
  121.        "(zone:net/node.point)"
  122. ))     
  123.  
  124. (set #node_routing
  125.   (cat "Enter the general routing address "
  126.        "- must be one of your enteres uplinks\n"
  127.        "(zone:net/node.point)"
  128. ))
  129.  
  130. (set #node_echo1
  131.   (cat "Enter a name of one of your public echos\n"
  132.        "(e.g. AMIGA.GER)"
  133. ))
  134.  
  135. (set #node_echo2
  136.   (cat "Enter a name of a 2nd one of your public echos\n"
  137.        "(e.g. AMIGA.EUR)"
  138. ))
  139.  
  140. (set #wegotit
  141.   (cat "We have finished installation! Continue to read the doc file "
  142.        "to known what has happened."
  143. ))
  144.  
  145. (set #exit
  146.   (cat "JS_TOSS is installed now!\n\nStart JS_TOSS once to generate "
  147.        "all required files automatically."
  148. ))
  149.  
  150. (set #exit2
  151.   (cat "JS_TOSS updated!\n\nYou may continue to work like before."
  152. ))
  153.  
  154. ;--------------------------------------------------------------------
  155. ;install
  156. ;
  157.  
  158. (message #inst)
  159.  
  160. (welcome)
  161.  
  162. ; check if already installed
  163.  
  164. (if (exists "mail:js_toss.cfg" (noreq))
  165. (
  166.  
  167.         (set upd (askchoice (prompt #update)
  168.                             (help @askchoice-help)
  169.                             (choices #update_choices_update
  170.                                      #update_choices_new)))
  171.  
  172.         (if (= 0 upd)
  173.         (
  174.                 (set @default-dest
  175.                      (askdir (prompt #binaryDrawer)
  176.                              (default "mail:bin")
  177.                              (help @askdir-help)))
  178.  
  179.                 (copyfiles (source "bin")
  180.                            (dest @default-dest)
  181.                            (pattern "#?")
  182.                            (files)
  183.                            (infos))
  184.  
  185.                 (exit #exit2)
  186.         ))
  187. ))
  188.  
  189. (message #start)
  190.  
  191. ; ask for dirs
  192.  
  193. (set @default-dest
  194.      (askdir (prompt #binaryDrawer)
  195.              (default "mail:bin")
  196.              (help @askdir-help)))
  197.  
  198. (set WBbin
  199.      (askdir (prompt #WBbinDrawer)
  200.              (default "mail:bin")
  201.              (help @askdir-help)))
  202.  
  203. (set acf_dir
  204.      (askdir (prompt #areasDrawer)
  205.              (default "mail:")
  206.              (help @askdir-help)))
  207.  
  208. ; copy files
  209.  
  210. (copyfiles (source "bin/JS_Toss")
  211.            (dest @default-dest)
  212.            (files)
  213.            (infos))
  214.  
  215. (copyfiles (source "bin/JS_CheckAddress")
  216.            (dest @default-dest)
  217.            (files)
  218.            (infos))
  219.  
  220. (copyfiles (source "bin/JS_Config")
  221.            (dest WBbin)
  222.            (files)
  223.            (infos))
  224.  
  225. (copyfiles (source "libs")
  226.            (dest "libs:")
  227.            (pattern "#?")
  228.            (files)
  229.            (infos))
  230.  
  231. (set acf_dirname
  232.      (tackon acf_dir "js_toss"))
  233.  
  234. (makedir acf_dirname)
  235.  
  236. ; areafix language
  237.  
  238. (set lang (askchoice (prompt #areafixlanguages)
  239.                      (help @askchoice-help)
  240.                      (choices "deutsch (german)"
  241.                               "english")))
  242.  
  243. ; german in buildin, so nothing to copy
  244.  
  245. (if (= 1 lang)
  246. (
  247.         (copyfiles (source "Languages/english")
  248.                    (newname "JS_Areafix.language")
  249.                    (dest acf_dirname)
  250.                    (files)
  251.                    (infos))
  252. ))
  253.  
  254. ; generate config file - ask dirs
  255.  
  256. (set nodelist
  257.      (askdir (prompt #nodelistDrawer)
  258.              (default "nodelist:")
  259.              (help @askdir-help)))
  260.  
  261. (set tempdir
  262.      (askdir (prompt #tempDrawer)
  263.              (default "mail:t")
  264.              (help @askdir-help)))
  265.  
  266. (set inb
  267.      (askdir (prompt #inboundDrawer)
  268.              (default "mail:inbound")
  269.              (help @askdir-help)))
  270.  
  271. (set outb
  272.      (askdir (prompt #outboundDrawer)
  273.              (default "mail:outbound")
  274.              (help @askdir-help)))
  275.  
  276. (set sysin
  277.      (askdir (prompt #sysinDrawer)
  278.              (default "mail:sysop_inbound")
  279.              (help @askdir-help)))
  280.  
  281. (set sysout
  282.      (askdir (prompt #sysoutDrawer)
  283.              (default "mail:sysop_outbound")
  284.              (help @askdir-help)))
  285.  
  286. (set bbsin
  287.      (askdir (prompt #bbsinDrawer)
  288.              (default "mail:bbs_inbound")
  289.              (help @askdir-help)))
  290.  
  291. (set bbsout
  292.      (askdir (prompt #bbsoutDrawer)
  293.              (default "mail:bbs_outbound")
  294.              (help @askdir-help)))
  295.  
  296. ; ask for some strings
  297.  
  298. (set node_number
  299.      (askstring (prompt #node_number)
  300.                 (help @askstring-help)))
  301.  
  302. (set node_name
  303.      (askstring (prompt #node_name)
  304.                 (help @askstring-help)))
  305.  
  306. (set node_uplink1
  307.      (askstring (prompt #node_uplink1)
  308.                 (help @askstring-help)))
  309.  
  310. (set node_uplink2
  311.      (askstring (prompt #node_uplink2)
  312.                 (help @askstring-help)))
  313.  
  314. (set node_uplink3
  315.      (askstring (prompt #node_uplink3)
  316.                 (help @askstring-help)))
  317.  
  318. (set node_route
  319.      (askstring (prompt #node_routing)
  320.                 (help @askstring-help)
  321.                 (default node_uplink1)))
  322.  
  323. (set node_echo1
  324.      (askstring (prompt #node_echo1)
  325.                 (help @askstring-help)))
  326.  
  327. (set node_echo2
  328.      (askstring (prompt #node_echo2)
  329.                 (help @askstring-help)))
  330.  
  331.  
  332. ; write config file
  333.  
  334. (set cfg_file
  335.   (cat ";\n"
  336.        "; JS_TOSS config\n"
  337.        "; also used by JS_AREAFIX\n"
  338.        ";\n"
  339.        "; generated by the installer script\n"
  340.        ";\n"
  341.        "inbound " inb "\n"
  342.        "outbound " outb "\n"
  343.        "areaconfig " acf_dirname "\n\n"
  344.        "bbsin " bbsout "\n"
  345.        "bbsout " bbsin "\n\n"
  346.        "sysin " sysout "\n"
  347.        "sysout " sysin "\n\n"
  348.        "; dont forget:\n"
  349.        "; JS_TOSS's sysop/bbs inbound is sysop/bbs OUTbound\n"
  350.        "; JS_TOSS's sysop/bbs outbound is sysop/bbs INbound\n\n"
  351.        "logfile mail:js_toss.log\n"
  352.        "tempdir ram:t\n"
  353.        ";this should be in ram, it's the temp for mail robots\n\n"
  354.        "packdir " tempdir "\n"
  355.        "; this shouldn't be in ram\n\n"
  356.        "secure\nglobalautonew\nbadmail\n"
  357.        "nodelist " nodelist "\n\n"
  358.  
  359.        "node " node_number "\n"
  360.        " name \"" node_name "\"\n"
  361.        " link " node_uplink1 "\n"
  362.        " link " node_uplink2 "\n"
  363.        " link " node_uplink3 "\n"
  364.        " route *:*/*.* " node_route "\n"
  365.        " attach *:*/*.*\n"
  366.        ";file attach allowed for all\n"
  367.        " autonew " node_uplink1 "\n"
  368.        ";only the first link is allowed to make new echos here\n"
  369.        "\n;end of node, next node starts with NODE command\n"
  370.  
  371.        "\n\n;\n"
  372.        "; JS_Areafix config\n"
  373.        ";\n"
  374.        "packer LHA \"c:lha a\" \"c:lha x\" \"The typical Amiga Packer\"\n"
  375.        "packer GZIP \"c:gzip\" \"c:gzip -d\" \"efficient unix packer\"\n"
  376.        "\nlogareafix\n"
  377. ))
  378.  
  379. (textfile (dest "mail:js_toss.cfg")
  380.           (append cfg_file)
  381. )
  382.  
  383. ; gen zone config file
  384.  
  385. (set zone "")
  386. (set l (strlen node_number))
  387. (set i 0)
  388.  
  389. (while (and (<> ":" (substr node_number i 1)) (< i l))
  390. (
  391.        (set zone (cat zone (substr node_number i 1)))
  392.        (set i (+ i 1))
  393. ))
  394.  
  395. (set zonecfg
  396.    (cat "Zone_" zone ".cfg"
  397. ))
  398.  
  399. (set cfg_file
  400.   (cat "area \"" node_echo1 "\" \"no description\"\n"
  401.        "area \"" node_echo2 "\" \"no description\"\n"
  402. ))
  403.  
  404. (textfile (dest (tackon acf_dirname zonecfg))
  405.           (append cfg_file)
  406. )
  407.  
  408. (message #wegotit)
  409.  
  410. (exit #exit)
  411.